import { register } from '@logicflow/vue-node-registry'
import UserTaskNode from '../demo/LFElements/UserTaskNode.vue'
import SystemTaskNode from '../demo/LFElements/SystemTaskNode.vue'
import GatewayNode from '../demo/LFElements/GatewayNode.vue'
import StartNode from '../demo/LFElements/Start.vue'
import EndNode from '../demo/LFElements/End.vue'
import EditableText from '../demo/LFElements/EditableText.vue'
import  customEdge from '../demo/LFTool/custom-edge'
const setRegister = (lf:any) => {
    // 注册自定义 vue 节点
    register({
        type: 'userTask',
        component: UserTaskNode            
    }, lf)

    register({
        type: 'systemTask',
        component: SystemTaskNode            
    }, lf)

    register({
        type: 'gateway',
        component: GatewayNode
    }, lf)

    register({
        type: 'start',
        component: StartNode
    }, lf)
    
    register({
        type: 'end',
        component: EndNode
    }, lf)
    
    register({
        type: 'custText',
        component: EditableText
    }, lf)

    //注册自定义边
    lf.register(customEdge);
    lf.setDefaultEdgeType('custom-edge');
}

export default setRegister;